$(document).ready(function() {
    checkLogin();
    loginInit();
    dropOut();
    $(".sort").hover(function () {
        $(".nav-list").stop().slideDown();
    },function () {
        $(".nav-list").stop().slideUp();
    });
    $(".menu li").mouseover(function(){
        $(this).addClass('on').siblings().removeClass('on');
    });
    $(".submit").click(function(){
        window.location.href="pay.html";
    });
   var price = $(".product .pro-price span").html();
   var number = $(".product .center span").html();
   var amount = parseInt(price)*parseInt(number);
   var totalPrice = 0;
   var shippingCosts = parseInt($(".product .end .shippingCosts span").html());
   $(".product .end span").html(amount.toFixed(2));
   $(".content ul li").each(function(){
       totalPrice += parseInt($(".product .end span").html());
   });
   $(".totalPrice span b").html(totalPrice.toFixed(2));
   $(".shippingCosts span b").html(shippingCosts.toFixed(2));
   $(".sum span b").html((totalPrice+shippingCosts).toFixed(2));
});